import React, {
    Fragment,
    PureComponent
} from 'react';

import {
    Socket
} from './../components';

import Launch from './launch';
import Listen from './listen';

class Plug extends PureComponent {
    render() {
        const {
            children
        } = this.props;
        return (
            <Fragment>
                {children}
                {this._render}
            </Fragment>
        )
    }

    get _render() {
        return (
            <Fragment>
                <Launch />
                <Socket children={<Listen />}/>
            </Fragment>
        )
    }
}

export default Plug;